package com.liufeng.crm.mapper;

import com.liufeng.crm.base.BaseMapper;
import com.liufeng.crm.bean.Module;
import com.liufeng.crm.dto.TreeDto;
import org.apache.ibatis.annotations.MapKey;


import java.util.List;
import java.util.Map;

public interface ModuleMapper extends BaseMapper<Module,Integer> {

    public List<TreeDto> selectModules();

    List<Module> selectAllModules();

    Module queryModuleByGradeAndModuleName(Integer grade, String moduleName);

    Module queryModuleByGradeAndUrl(Integer grade, String url);

    Module queryModuleByOptValue(String optValue);

    int countSubModuleByParentId(Integer mid);

    @MapKey("")
    List<Map<String, Object>> selectAllModuleByGrade(Integer grade);

}